DEF_PROJECT=../../..
include $(DEF_PROJECT)/scripts/main.mk
name=util-linux
version=2.22.1
prefix=/usr
destdir=$(DIR_SYSROOT)
deps=ncurses
extdeps=eglibc-tools gcc-tools binutils-tools linux-header-tools

DL_SERV=http
DL_HOST=www.kernel.org
DL_PATH=/pub/linux/utils/$(name)/v$(basename $(version))
DL_SUFFIX=tar.bz2

CFLAGS+=-I$(destdir)/usr/include
LDFLAGS+=-L$(destdir)/usr/lib

cflags+=--host=$(CC_TARGET)
cflags+=--build=$(CC_HOST)
cflags+=--disable-login
cflags+=--disable-su
cflags+=--disable-makeinstall-chown
cflags+=--disable-makeinstall-setuid

post-install:
	$(MAKE) -C $(if $(build),$(build),$(source)) $(iflags)
	mv $(destdir)/usr/bin/logger $(destdir)/bin
